Remove O_NDELAYs from all opens - it torments the Linux/USB ttys for no
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 4 Jan 2005 03:51:02 +0000 (03:51 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 4 Jan 2005 03:51:02 +0000 (03:51 +0000)
good reason and it's not like the code really does the right thing with
O_NDELAY anyway...

gpsbabel/jeeps/gpsserial.c

index 91451311caca82f06df0eb633cdff3039d169c7c..68b97a9dac1c09f216d77db2db7ec20ef8fd1a5c 100644 (file)
@@ -61,6 +61,11 @@ char *rxdata[] = {
  *  internal.   This means we ignore that 'fd' number that gets passed in.
  */
 
+static HANDLE comport;
+
+/*
+ * Display an error from the serial subsystem.
+ */
 void GPS_Serial_Error(char *hdr)
 {
        char msg[200];
@@ -76,8 +81,6 @@ void GPS_Serial_Error(char *hdr)
        GPS_Error(msg);
 }
 
-static HANDLE comport;
-
 int32 GPS_Serial_On(const char *port, int32 *fd)
 {
        DCB tio;
@@ -248,7 +251,7 @@ int32 GPS_Serial_Savetty(const char *port)
 
     if (gps_is_usb) return 1;
     
-    if((fd = open(port, O_RDWR|O_NDELAY))==-1)
+    if((fd = open(port, O_RDWR))==-1)
     {
        perror("open");
        gps_errno = SERIAL_ERROR;
@@ -264,7 +267,6 @@ int32 GPS_Serial_Savetty(const char *port)
        return 0;
     }
 
-
     if(!GPS_Serial_Close(fd,port))
     {
        gps_errno = SERIAL_ERROR;
@@ -291,7 +293,7 @@ int32 GPS_Serial_Restoretty(const char *port)
 
     if (gps_is_usb) return 1;
     
-    if((fd = open(port, O_RDWR|O_NDELAY))==-1)
+    if((fd = open(port, O_RDWR))==-1)
     {
        perror("open");
        gps_errno = HARDWARE_ERROR;
@@ -340,7 +342,6 @@ int32 GPS_Serial_Open(int32 *fd, const char *port)
        return 0;
     }
 
-
     if(tcgetattr(*fd,&tty)==-1)
     {
        perror("tcgetattr");